package com.hopu.v1.pojo.course;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import com.hopu.v1.pojo.common.Save;
import com.hopu.v1.pojo.common.Update;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * 课程作业表
 * @TableName t_course_homework
 */
@TableName(value ="t_course_homework")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CourseHomework implements Serializable {
    /**
     * 课程作业id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 课程id
     */
    private Long courseId;

    /**
     * 作业题目
     */
    @TableField(value = "homework_topic")
    @Length(message = "题目超过字数限制", max = 255)
    @NotNull(message = "题目不能为空")
    private String homeworkTopic;

    /**
     * 参考答案
     */
    @TableField(value = "homework_answer")
    @Length(message = "参考答案超过字数限制", max = 255)
    @NotNull(message = "参考答案不能为空")
    private String homeworkAnswer;

    /**
     * 作业排序
     */
    private Long homeworkBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}